package com.ktgj.customer.mapper;

import java.util.List;

import com.ktgj.customer.domain.BusinessOrder;
import com.ktgj.customer.domain.BusinessOrderSub;
import org.apache.ibatis.annotations.Param;

/**
 * 订单子Mapper接口
 * 
 * @author ruoyi
 * @date 2021-07-30
 */
public interface BusinessOrderSubMapper 
{
    /**
     * 查询订单子
     * 
     * @param orderSubId 订单子ID
     * @return 订单子
     */
    public BusinessOrderSub selectBusinessOrderSubById(Long orderSubId);

    /**
     * 查询订单子列表
     * 
     * @param businessOrderSub 订单子
     * @return 订单子集合
     */
    public List<BusinessOrderSub> selectBusinessOrderSubList(BusinessOrderSub businessOrderSub);

    /**
     * 新增订单子
     * 
     * @param businessOrderSub 订单子
     * @return 结果
     */
    public int insertBusinessOrderSub(BusinessOrderSub businessOrderSub);

    /**
     * 修改订单子
     * 
     * @param businessOrderSub 订单子
     * @return 结果
     */
    public int updateBusinessOrderSub(BusinessOrderSub businessOrderSub);

    /**
     * 删除订单子
     * 
     * @param orderSubId 订单子ID
     * @return 结果
     */
    public int deleteBusinessOrderSubById(Long orderSubId);

    /**
     * 批量删除订单子
     * 
     * @param orderSubIds 需要删除的数据ID
     * @return 结果
     */
    public int deleteBusinessOrderSubByIds(Long[] orderSubIds);

    public int insertBatch(@Param("businessOrderSubs") List<BusinessOrderSub> businessOrderSubs);

    int queryCardCount(@Param("customerId") Long customerId, @Param("cardId") Long cardId);

    void updateWhetherRefund(@Param("cardId") Long cardId);

    /**
     * 主订单id获取详细信息
     * */
    public BusinessOrderSub businessOrderSub(Long orderId);

    public List<BusinessOrderSub> businessOrderSubByOrderId(Long orderId);

    /**
     * 订单号获取子订单信息
     * */
    public List<BusinessOrderSub> businessOrderSubByOrderNum(String orderNum);

    /**
     * 卡id
     * */
    public BusinessOrderSub businessOrderSubByID(Long id);
}
